1. Field of the Invention
The invention relates to image processing, and in particular, to an image processing system and method for scaling or resolution of an image.
2. Description of the Related Art
Image and display systems often require image resolution to be scaled up or down to meet various requirements. Images (pixels) resolution may be scaled upward from low resolution to high resolution. Images may also be scaled down when the original resolution is higher than the desired display resolution. When an original image is displayed in a different resolution to form a new image, the changed resolution causes the pixel value of each pixel point in a newly formed image to be formed by more pixel values of original pixel points in the original image with specific theoretical combination ratios applied thereto.
For example, if a pixel value of pixel point NA′ in the new image is formed by two pixel values of original pixel points NA and NB respectively in the original image, the pixel value of pixel point NA′ may be theoretically the summation of ⅔ the pixel value for pixel point NA and ⅓ the pixel value for pixel point NB or of half the pixel value summation of both pixel points NA and NB.
A common technique used to scale image resolution is linear interpolation. The linear interpolation utilizes pixel value of each pixel point needed for the new pixel point and its related theoretical combination ratio to generate the new pixel value of a pixel point in the new image resolution. As shown in FIG. 1, for example, if an image resolution is to be downscaled from an original resolution with 500 points to a target resolution with 300 points by 1D (one dimension) interpolation, new pixel values PA′, PB′ and PC′ of pixel points NA′, NB′ and NC′ respectively in the target resolution can be determined according to pixel values PA, PB, PC, PD and PE of pixel points NA, NB, NC, ND and NE respectively in the original resolution using following formulae:
                                          P                          A              ′                                =                                                    300                ×                                  P                  A                                            +                              200                ×                                  P                  B                                                      500                          ,                            (        1        )                                                      P                          B              ′                                =                                                    100                ×                                  P                  B                                            +                              300                ×                                  P                  C                                            +                              100                ×                                  P                  D                                                      500                          ,                            (        2        )                                                      P                          C              ′                                =                                                    200                ×                                  P                  D                                            +                              300                ×                                  P                  E                                                      500                          ,                            (        3        )            where the numbers 300 and 200 in formula (1) indicate theoretical combination ratios RA and RB for pixel values PA and PB forming the pixel value PA′, respectively. In addition, it can be observed from formula (1) to (3) that each theoretical combination ratio for the pixel value of pixel point NA, NB, NC, ND, or NE depends on the resolution used. In this example, each theoretical combination ratio is not exceeding 300 (i.e. the target resolution) and each denominator in the formula is 500 (i.e. the original resolution).
Scaling an image up or down directly by linear interpolation requires several multiplication and division operations, thus requiring hardware design with sufficient bit number of multipliers and dividers to perform the necessary operations. Typically, as the bit number of multiplier or divider increases, hardware cost and complexity increase accordingly. In this example, if the image is scaled from a resolution with 500 points to another resolution with 300 points, at least nine bits of multiplier/divider in the hardware are required to complete the operations.
Once the image is enlarged or becomes a two- or more dimension image, the bit number of multiplier/divider needed for hardware is also increased relatively. Accordingly, hardware costs and the time for operation increase.
Thus, a method and system for scaling image resolution with reduced hardware cost and operating time are desired.